package com.yuju.order.enums;
public enum InvoiceTypeEnum {
	 	PP((byte)1,"普票"),
	    ZP((byte)2, "专票");
	    private byte value;
	    private String name;

	    InvoiceTypeEnum(byte value, String name) {
	        this.name = name;
	        this.value = value;
	    }

	    public String getName() {
	        return name;
	    }

	    public byte getValue() {
	        return value;
	    }
	    public static String getNameByValue(byte value){
	    	for(InvoiceTypeEnum e : InvoiceTypeEnum.values()){
	    		if(e.getValue()== value){
	    			return e.getName();
	    		}
	    	}
			return "未知枚举";
	    }
	    
}
